package datastructure.tree;

/**
 *
 * @author Lei
 */
public class GetLeftMostChild {

    public static TreeNode getLeftMostChild(TreeNode n) {
        if (n == null) {
            return null;
        }
        TreeNode next = n;
        while (next.left != null) {
            next = next.left;
        }
        return next;
         
    }
}
